(function(){
    _$(document).ready(function(){
        function App(){};
        function compare(property){
            return function(b,a){
                var value1 = a[property];
                var value2 = b[property];
                return value1 - value2;
            }
        }
        var barr=null;
        App.prototype.ajaxFn=function(){
            _$.ajax({
                type:'post',
                dataType:'json',
                url:'/bookcase',
                async:false,
                success:function(json) {
                    //console.log(json);
                    if(json['code']==1){
                        barr=json['bookshelf'];
                        //console.log(barr);
                        var html="";
                        var ahtml="";
                        var h="";
                        for(var val in barr){
                            if(val==0){
                                html+='<li class="select-option selected" data-id="'+barr[val]['sjid']+'" data-num="'+barr[val]['books'].length+'">';
                            }else{
                                html+='<li class="select-option"  data-id="'+barr[val]['sjid']+'" data-num="'+barr[val]['books'].length+'">';
                                ahtml+='<a href="javascript:" class="select-option" data-id="'+barr[val]['sjid']+'" data-num="'+barr[val]['books'].length+'"><i class="icon-file"></i> '+barr[val]['sjname']+'</a>';
                            }
                            html+=barr[val]['sjname']+'(<span class="group-cnt">'+barr[val]['books'].length+'</span>)';
                            html+='</li>';
                        }
                        for(var v  in barr){
                            if(v==0){
                                h+='<a href="javascript:" class="select-option selected" data-id="'+barr[v]['sjid']+'" data-num="'+barr[v]['books'].length+'">'+barr[v]['sjname']+'</a>';
                            }else{
                                h+='<a href="javascript:" class="select-option" data-id="'+barr[v]['sjid']+'" data-num="'+barr[v]['books'].length+'">'+barr[v]['sjname']+'</a>';
                            }
                        }
                        //书架选择生成
                        _$("#bookglsc").html(html);
                        //书书籍搜索时间类型选择生成
                        _$("#asideglsc").html(h);
                        _$("#fenzushujia").html(ahtml);
                        if(_$("#bookglsc li.selected").attr('data-id')=="1"){
                            _$("#yichushujia").hide();
                        }else{
                            _$("#yichushujia").show();
                        }
                        var books=barr[0]['books'];
                        books=books.sort(compare('readTime'));
                        _$("#editHeaderTit").html(books.length);
                        _$("#mrsjskd").html("");
                        //书架分组选择
                        if(books.length>0){
                            var bookshtml="";
                            for(var value in books){
                                books[value]['readTime']=getTimes(books[value]['readTime']);
                                _$.ajax({
                                    type:'post',
                                    url:'/getbookInfo',
                                    data:{bid:books[value]['bid']},
                                    async:false,
                                    success:function(data){
                                        books[value]['bookinfo']=data['info']['bookInfo'];
                                        books[value]['index']=parseInt(value);
                                        books[value]['bookinfo']['updateTime']=getTimes(books[value]['bookinfo']['updateTime']);
                                       // console.log(books[value]);
                                        var html = template('tpl', books[value]);
                                        _$("#mrsjskd").append(html);
                                    }
                                });
                            }
                            $(".book-li .ui-checkbox-s").click(function(){
                                var key=_$(this).attr('data-key');
                                if(key=="1"){
                                    _$(this).addClass('active').attr('data-key',"0");
                                }else if(key=="0"){
                                    _$(this).removeClass('active').attr('data-key',"1");
                                }
                                var le=$(".book-li .ui-checkbox-s.active").length;
                                if(le>0){
                                    _$(".footer-edit").animate({"height":"2.7rem"},200);
                                }else{
                                    _$(".footer-edit").animate({"height":"0rem"},200);
                                }
                                _$("#removenum").html(le);
                            });
                        }else{
                            _$("#mrsjskd").html('<div class="null">默认书架是空的</div>');
                        }
                        //书架分组选择
                        _$("#asideglsc a").click(function(){
                            var ki=_$(this).index();
                            var key=parseInt(_$(this).attr('data-id'));
                            var _this=_$(this);
                            var num=_$(this).attr('data-num');
                            _$(this).addClass('selected').siblings('a').removeClass('selected');
                            _$("#bookglsc li").eq(ki).addClass('selected').siblings('li').removeClass('selected');
                            if(num>0){
                                _$("#mrsjskd").html("");
                                var books=barr[(key-1)]['books'];
                                books=books.sort(compare('readTime'));
                                _$("#editHeaderTit").html(books.length);
                                var bookshtml="";
                                for(var value in books){
                                    books[value]['readTime']=getTimes(books[value]['readTime']);
                                    _$.ajax({
                                        type:'post',
                                        url:'/getbookInfo',
                                        data:{bid:books[value]['bid']},
                                        async:false,
                                        success:function(data){
                                            books[value]['bookinfo']=data['info']['bookInfo'];
                                            books[value]['index']=parseInt(value);
                                            books[value]['bookinfo']['updateTime']=getTimes(books[value]['bookinfo']['updateTime']);
                                            //console.log(books[value]);
                                            var html = template('tpl', books[value]);
                                            _$("#mrsjskd").append(html);
                                        }
                                    });
                                }
                                $(".book-li .ui-checkbox-s").click(function(){
                                    var key=_$(this).attr('data-key');
                                    if(key=="1"){
                                        _$(this).addClass('active').attr('data-key',"0");
                                    }else if(key=="0"){
                                        _$(this).removeClass('active').attr('data-key',"1");
                                    }
                                    var le=$(".book-li .ui-checkbox-s.active").length;
                                    if(le>0){
                                        _$(".footer-edit").animate({"height":"2.7rem"},200);
                                    }else{
                                        _$(".footer-edit").animate({"height":"0rem"},200);
                                    }
                                    _$("#removenum").html(le);
                                });
                            }else{
                                _$("#mrsjskd").html('<div class="null">默认书架是空的</div>');
                            }
                            if(_$("#bookglsc li.selected").attr('data-id')=="1"){
                                _$("#yichushujia").hide();
                            }else{
                                _$("#yichushujia").show();
                            }
                            _$("#asd").fadeOut();
                        });
                        //书籍搜索时间类型选择
                        _$("#asideglte a").click(function(){
                            var ki=_$(this).index();
                            var _this=_$(this);
                            _$(this).addClass('selected').siblings('a').removeClass('selected');
                            _$("#bookglte li").eq(ki).addClass('selected').siblings('li').removeClass('selected');
                            _$("#asd1").fadeOut();
                        });
                    }else{
                        tip('服务器出错');
                    }
                }
            });
        };
        App.prototype.eventFn=function(){
            _$("#bookEditBtn").click(function(){
                _$("#mrsjskd").addClass('enabled');
                _$("#editBtnHeader").hide();
                _$("#editHeader").show();
            });
            _$("#btnEditCancel").click(function(){
                _$("#mrsjskd").removeClass('enabled');
                _$("#editBtnHeader").show();
                _$("#editHeader").hide();
                _$(".ui-checkbox-s").removeClass('active').attr('data-key',1);
                _$(".footer-edit").animate({"height":"0rem"},200);
            });
            _$("#btnEditAll").click(function(){
                var key=_$(this).attr('data-key');
                if(key=="1"){
                    _$(".ui-checkbox-s").addClass('active').attr('data-key',"0");
                    _$(this).attr('data-key',"0").html('不选');
                    var le=$(".book-li .ui-checkbox-s.active").length;
                    if(le>0){
                        _$(".footer-edit").animate({"height":"2.7rem"},200);
                    }else{
                        _$(".footer-edit").animate({"height":"0rem"},200);
                    }
                    _$("#removenum").html(le);
                }else if(key=="0"){
                    _$(".ui-checkbox-s").removeClass('active').attr('data-key',"1");
                    _$(this).attr('data-key',"1").html('全选');
                    var le=$(".book-li .ui-checkbox-s.active").length;
                    if(le>0){
                        _$(".footer-edit").animate({"height":"2.7rem"},200);
                    }else{
                        _$(".footer-edit").animate({"height":"0rem"},200);
                    }
                    _$("#removenum").html(0);
                }
            });
            _$("#remove").click(function(){
                var dia=$.dialog({
                    title:"",
                    content:"确定删除？",
                    button:["确定","取消"]
                });
                dia.on("dialog:action",function(e){
                    if(e.index==0){
                        var sjid=_$("#bookglsc li.selected").attr('data-id');
                        _$(".ui-checkbox-s.active").each(function(index){
                            var taht=_$(this);
                            _$.ajax({
                                type:"post",
                                url:"/removeBookcase",
                                async:false,
                                data:{
                                    bid:_$(this).parent('.book-li').attr('data-book-id'),
                                    sjid:sjid,
                                    booksId:_$(this).parent('li').attr("data-books-index")
                                },
                                success:function(data){
                                    if(data['code']==1){
                                        taht.parent('li').remove();
                                        if(_$(".ui-checkbox-s").length<1){
                                            if(sjid==1){
                                                _$("#mrsjskd").html('<div class="null">默认书架是空的</div>');
                                            }else{
                                                _$("#mrsjskd").html('<div class="null">分组是空的</div>');
                                            }
                                        }
                                    }else{
                                        tip("访问数据库出错");
                                    }
                                }
                            })
                        });
                        shdianj();
                        xbl();
                        _$(".footer-edit").animate({"height":"0rem"},200);
                        _$("#removenum").html(0);
                        _$("#editHeaderTit").html(_$(".ui-checkbox-s").length);
                    }else{
                        return true;
                    }
                });
            });
            _$("#move").click(function(){
               _$("#asd2").fadeIn();
            });
            _$("#asd_over2").click(function(){
                _$("#asd2").fadeOut();
                _$("#qxbc").animate({"height":"0"},200,function(){
                    _$("#addcase").animate({"height":"auto"},200).show();
                });
            });
            _$("#newDir").click(function(){
                _$("#addcase").animate({"height":"0"},200).hide();
                _$("#qxbc").animate({"height":"8rem"},200);
                _$("#newDirval").focus();
            });
            _$("#qxbcQqx").click(function(){
                _$("#qxbc").animate({"height":"0"},200,function(){
                    _$("#addcase").animate({"height":"auto"},200).show();
                });
            });
            _$("#qxbcSave").click(function(){
                var val=_$("#newDirval").val();
                if(val.length>10){
                    tip("分组名字不能大于10个字");
                }else{
                    var sjid=_$("#bookglsc li.selected").attr('data-id');
                    var key=true;
                    _$(".ui-checkbox-s.active").each(function(index){
                        if(key){
                            var taht=_$(this);
                            _$.ajax({
                                type:"post",
                                url:"/addBookShelf",
                                async:false,
                                data:{
                                    bid:_$(this).parent('.book-li').attr('data-book-id'),
                                    sjid:sjid,
                                    booksId:_$(this).parent('li').attr("data-books-index"),
                                    val:val,
                                    key:key
                                },
                                success:function(data){
                                    if(data['code']==1){
                                        console.log(data['msg'])
                                    }
                                }
                            });
                            key=false;
                        }else{
                            var taht=_$(this);
                            _$.ajax({
                                type:"post",
                                url:"/addBookShelf",
                                async:false,
                                data:{
                                    bid:_$(this).parent('.book-li').attr('data-book-id'),
                                    sjid:sjid,
                                    booksId:_$(this).parent('li').attr("data-books-index"),
                                    val:val,
                                    key:key
                                },
                                success:function(data){
                                    if(data['code']==1){
                                        console.log(data['msg'])
                                    }
                                }
                            })
                        }
                    });
                    _$(".ui-checkbox-s.active").each(function(index) {
                        var taht=_$(this);
                        _$.ajax({
                            type:"post",
                            url:"/removeBookcase",
                            async:false,
                            data:{
                                bid:_$(this).parent('.book-li').attr('data-book-id'),
                                sjid:sjid,
                                booksId:_$(this).parent('li').attr("data-books-index")
                            },
                            success:function(data){
                                if(data['code']==1){
                                    taht.parent('li').remove();
                                    if($(".ui-checkbox-s").length<1){
                                        if(sjid==1){
                                            _$("#mrsjskd").html('<div class="null">默认书架是空的</div>');
                                        }else{
                                            _$("#mrsjskd").html('<div class="null">分组是空的</div>');
                                        }
                                    }
                                }else{
                                    tip("访问数据库出错");
                                }
                            }
                        })
                    });
                    _$("#asd2").fadeOut();
                    _$("#editHeader").hide();
                    _$("#editBtnHeader").show();
                    _$("#removenum").html(0);
                    _$("#mrsjskd").removeClass('enabled');
                    _$("#bookglsc li.selected .group-cnt,#editHeaderTit").html($(".ui-checkbox-s").length);
                    _$(".footer-edit").animate({"height":"0rem"},200);
                    _$("#qxbc").animate({"height":"0"},200,function(){
                        _$("#addcase").animate({"height":"auto"},200).show();
                    });
                    shdianj();
                    xbl();
                }
            });
            _$("#yichushujia").click(function(){
                var sjid=_$("#bookglsc li.selected").attr('data-id');
                var sjid1=1;
                _$(".ui-checkbox-s.active").each(function(index){
                    var taht = _$(this);
                    _$.ajax({
                        type: "post",
                        url: "/moveBookShelf",
                        async: false,
                        data: {
                            bid: _$(this).parent('.book-li').attr('data-book-id'),
                            sjid: sjid,
                            sjid1:sjid1,
                            booksId: _$(this).parent('li').attr("data-books-index")
                        },
                        success: function (data) {
                            if (data['code'] == 1) {
                                console.log(data['msg'])
                            }
                        }
                    });
                });
                _$(".ui-checkbox-s.active").each(function(index) {
                    var taht=_$(this);
                    _$.ajax({
                        type:"post",
                        url:"/removeBookcase",
                        async:false,
                        data:{
                            bid:_$(this).parent('.book-li').attr('data-book-id'),
                            sjid:sjid,
                            booksId:_$(this).parent('li').attr("data-books-index")
                        },
                        success:function(data){
                            if(data['code']==1){
                                taht.parent('li').remove();
                                if(_$(".ui-checkbox-s").length<1){
                                    if(sjid==1){
                                        _$("#mrsjskd").html('<div class="null">默认书架是空的</div>');
                                    }else{
                                        _$("#mrsjskd").html('<div class="null">分组是空的</div>');
                                    }
                                }

                            }else{
                                tip("访问数据库出错");
                            }
                        }
                    })
                });
                _$("#asd2").fadeOut();
                _$("#editHeader").hide();
                _$("#editBtnHeader").show();
                _$("#removenum").html(0);
                _$("#mrsjskd").removeClass('enabled');
                _$("#bookglsc li.selected .group-cnt,#editHeaderTit").html($(".ui-checkbox-s").length);
                _$(".footer-edit").animate({"height":"0rem"},200);
                _$("#qxbc").animate({"height":"0"},200,function(){
                    _$("#addcase").animate({"height":"auto"},200).show();
                });
                shdianj();
                xbl();
            });
            //
            function xbl(){
                _$("#fenzushujia a").click(function(){
                    var sjid=_$("#bookglsc li.selected").attr('data-id');
                    var sjid1=_$(this).attr('data-id');
                    if(sjid==sjid1){
                        tip("已经是当前分组了");
                    }else{
                        _$(".ui-checkbox-s.active").each(function(index){
                            var taht = _$(this);
                            _$.ajax({
                                type: "post",
                                url: "/moveBookShelf",
                                async: false,
                                data: {
                                    bid: _$(this).parent('.book-li').attr('data-book-id'),
                                    sjid: sjid,
                                    sjid1:sjid1,
                                    booksId: _$(this).parent('li').attr("data-books-index")
                                },
                                success: function (data) {
                                    if (data['code'] == 1) {
                                        console.log(data['msg'])
                                    }
                                }
                            });
                        });
                        _$(".ui-checkbox-s.active").each(function(index) {
                            var taht=_$(this);
                            _$.ajax({
                                type:"post",
                                url:"/removeBookcase",
                                async:false,
                                data:{
                                    bid:_$(this).parent('.book-li').attr('data-book-id'),
                                    sjid:sjid,
                                    booksId:_$(this).parent('li').attr("data-books-index")
                                },
                                success:function(data){
                                    if(data['code']==1){
                                        taht.parent('li').remove();
                                        if(_$(".ui-checkbox-s").length<1){
                                            if(sjid==1){
                                                _$("#mrsjskd").html('<div class="null">默认书架是空的</div>');
                                            }else{
                                                _$("#mrsjskd").html('<div class="null">分组是空的</div>');
                                            }
                                        }

                                    }else{
                                        tip("访问数据库出错");
                                    }
                                }
                            })
                        });
                        _$("#asd2").fadeOut();
                        _$("#editHeader").hide();
                        _$("#editBtnHeader").show();
                        _$("#removenum").html(0);
                        _$("#mrsjskd").removeClass('enabled');
                        _$("#bookglsc li.selected .group-cnt,#editHeaderTit").html($(".ui-checkbox-s").length);
                        _$(".footer-edit").animate({"height":"0rem"},200);
                        _$("#qxbc").animate({"height":"0"},200,function(){
                            _$("#addcase").animate({"height":"auto"},200).show();
                        });
                        shdianj();
                    }
                });
            }
            function shdianj(){
                _$("#bookglsc").html("");
                //书书籍搜索时间类型选择生成
                _$("#asideglsc").html("");
                _$("#fenzushujia").html("");
                _$.ajax({
                    type: 'post',
                    dataType: 'json',
                    url: '/bookcase',
                    data: {},
                    async: false,
                    success: function (json) {
                        if (json['code'] == 1) {
                            barr = json['bookshelf'];
                            //console.log(barr);
                            var html = "";
                            var ahtml = "";
                            var h = "";
                            for (var val in barr) {
                                if (val == 0) {
                                    html += '<li class="select-option selected" data-id="' + barr[val]['sjid'] + '" data-num="' + barr[val]['books'].length + '">';
                                } else {
                                    html += '<li class="select-option"  data-id="' + barr[val]['sjid'] + '" data-num="' + barr[val]['books'].length + '">';
                                    ahtml += '<a href="javascript:" class="select-option" data-id="' + barr[val]['sjid'] + '" data-num="' + barr[val]['books'].length + '"><i class="icon-file"></i> ' + barr[val]['sjname'] + '</a>';
                                }
                                html += barr[val]['sjname'] + '(<span class="group-cnt">' + barr[val]['books'].length + '</span>)';
                                html += '</li>';
                            }
                            for (var v  in barr) {
                                if (v == 0) {
                                    h += '<a href="javascript:" class="select-option selected" data-id="' + barr[v]['sjid'] + '" data-num="' + barr[v]['books'].length + '">' + barr[v]['sjname'] + '</a>';
                                } else {
                                    h += '<a href="javascript:" class="select-option" data-id="' + barr[v]['sjid'] + '" data-num="' + barr[v]['books'].length + '">' + barr[v]['sjname'] + '</a>';
                                }
                            }
                            //书架选择生成
                            _$("#bookglsc").html(html);
                            //书书籍搜索时间类型选择生成
                            _$("#asideglsc").html(h);
                            _$("#fenzushujia").html(ahtml);
                            var books=barr[0]['books'];
                            books=books.sort(compare('readTime'));
                            _$("#editHeaderTit").html(books.length);
                            _$("#mrsjskd").html("");
                            //书架分组选择
                            if(books.length>0){
                                var bookshtml="";
                                for(var value in books){
                                    books[value]['readTime']=getTimes(books[value]['readTime']);
                                    _$.ajax({
                                        type:'post',
                                        url:'/getbookInfo',
                                        data:{bid:books[value]['bid']},
                                        async:false,
                                        success:function(data){
                                            books[value]['bookinfo']=data['info']['bookInfo'];
                                            books[value]['index']=parseInt(value);
                                            books[value]['bookinfo']['updateTime']=getTimes(books[value]['bookinfo']['updateTime']);
                                            //console.log(books[value]);
                                            var html = template('tpl', books[value]);
                                            _$("#mrsjskd").append(html);
                                        }
                                    });
                                }
                                $(".book-li .ui-checkbox-s").click(function(){
                                    var key=_$(this).attr('data-key');
                                    if(key=="1"){
                                        _$(this).addClass('active').attr('data-key',"0");
                                    }else if(key=="0"){
                                        _$(this).removeClass('active').attr('data-key',"1");
                                    }
                                    var le=$(".book-li .ui-checkbox-s.active").length;
                                    if(le>0){
                                        _$(".footer-edit").animate({"height":"2.7rem"},200);
                                    }else{
                                        _$(".footer-edit").animate({"height":"0rem"},200);
                                    }
                                    _$("#removenum").html(le);
                                });
                            }else{
                                _$("#mrsjskd").html('<div class="null">默认书架是空的</div>');
                            }
                            xbl();
                            //书架分组选择
                            _$("#asideglsc a").click(function(){
                                var ki=_$(this).index();
                                var key=parseInt(_$(this).attr('data-id'));
                                var _this=_$(this);
                                var num=_$(this).attr('data-num');
                                _$(this).addClass('selected').siblings('a').removeClass('selected');
                                _$("#bookglsc li").eq(ki).addClass('selected').siblings('li').removeClass('selected');
                                if(num>0){
                                    _$("#mrsjskd").html("");
                                    var books=barr[(key-1)]['books'];
                                    books=books.sort(compare('readTime'));
                                    _$("#editHeaderTit").html(books.length);
                                    var bookshtml="";
                                    for(var value in books){
                                        books[value]['readTime']=getTimes(books[value]['readTime']);
                                        _$.ajax({
                                            type:'post',
                                            url:'/getbookInfo',
                                            data:{bid:books[value]['bid']},
                                            async:false,
                                            success:function(data){
                                                books[value]['bookinfo']=data['info']['bookInfo'];
                                                books[value]['index']=parseInt(value);
                                                books[value]['bookinfo']['updateTime']=getTimes(books[value]['bookinfo']['updateTime']);
                                                //console.log(books[value]);
                                                var html = template('tpl', books[value]);
                                                _$("#mrsjskd").append(html);
                                            }
                                        });
                                    }
                                    $(".book-li .ui-checkbox-s").click(function(){
                                        var key=_$(this).attr('data-key');
                                        if(key=="1"){
                                            _$(this).addClass('active').attr('data-key',"0");
                                        }else if(key=="0"){
                                            _$(this).removeClass('active').attr('data-key',"1");
                                        }
                                        var le=$(".book-li .ui-checkbox-s.active").length;
                                        if(le>0){
                                            _$(".footer-edit").animate({"height":"2.7rem"},200);
                                        }else{
                                            _$(".footer-edit").animate({"height":"0rem"},200);
                                        }
                                        _$("#removenum").html(le);
                                    });
                                }else{
                                    _$("#mrsjskd").html('<div class="null">默认书架是空的</div>');
                                }
                                if(_$("#bookglsc li.selected").attr('data-id')=="1"){
                                    _$("#yichushujia").hide();
                                }else{
                                    _$("#yichushujia").show();
                                }
                                _$("#asd").fadeOut();
                            });
                            //书籍搜索时间类型选择
                            _$("#asideglte a").click(function(){
                                var ki=_$(this).index();
                                var _this=_$(this);
                                _$(this).addClass('selected').siblings('a').removeClass('selected');
                                _$("#bookglte li").eq(ki).addClass('selected').siblings('li').removeClass('selected');
                                _$("#asd1").fadeOut();
                            });
                        }
                    }
                })
            }
            xbl();
            _$("#asd_over3").click(function(){
                _$("#asd3").fadeOut();
            });
            //书架选择弹出
            _$("#bookglsc").click(function(){
                _$("#asd").fadeIn();
            });
            //书籍搜索时间类型选择弹出
            _$("#bookglte").click(function(){
                _$("#asd1").fadeIn();
            });
            //书架选择隐藏
            _$("#asd_over").click(function(){
                _$("#asd").fadeOut();
            });
            //书籍搜索时间类型选择隐藏
            _$("#asd_over1").click(function(){
                _$("#asd1").fadeOut();
            });
            //获取历史阅读
            var localRead=localStorage.getItem('OLD_READ');
            if(localRead==""||localRead==null||localRead==undefined){
                //获取历史阅读为空时
                _$("#bookEditOl").html();
                _$("#ydjl").hide();
                setTimeout(function(){
                    _$("#zzjjz").hide();
                    _$("#zwydjl").show();
                },1000);
            }else{
                //获取历史阅读不为空时
                _$("#zwydjl").hide();//加载隐藏
                var localReadObj=JSON.parse(localRead);//把缓存书架转为json格式
                localReadObj=localReadObj.sort(compare('time'));
                if(localReadObj.length>0){
                    //显示历史阅读
                    for(var val in localReadObj){
                        localReadObj[val]['time']=getTimes(localReadObj[val]['time']);
                        var html = template('historytpl', localReadObj[val]);
                        _$("#bookEditOl").append(html);
                    }
                    _$("#bookEditOl").append('<a class="book-li-more">以上为全部阅读记录</a>');
                    setTimeout(function(){
                        _$("#zzjjz").hide();
                        _$("#ydjl").show();
                    },1000);
                }
            }

        };
        App.prototype.init=function(){
            //事件调用
            this.ajaxFn();
            this.eventFn();
        };
        //c程序初始化
        new App().init();
    })
})();
